﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DbSharp.Framework.DbObject;
using DbSharp.Framework.Driver;

namespace DbSharp.Framework.Assertion
{
    /// <summary>
    /// assertion interface
    /// </summary>
    interface IAssertion
    {
        bool Claim(object actual, object expected, List<FieldMetaData> actualMetaData, List<FieldMetaData> expectedMetaData, ITestDataSource actualPlugin, ITestDataSource expectedPlugin);
    }


    class LogicNotAssertion : IAssertion
    {
        IAssertion m_Assertion;
        public LogicNotAssertion(IAssertion assertion)
        {
            m_Assertion = assertion;
        }

        #region IAssertion Members

        public bool Claim(object actual, object expected, List<FieldMetaData> actualMetaData, List<FieldMetaData> expectedMetaData, ITestDataSource actualPlugin, ITestDataSource expectedPlugin)
        {
            if (m_Assertion.Claim(actual, expected, actualMetaData, expectedMetaData, actualPlugin, expectedPlugin))
                return false;
            else
                return true;
        }

        #endregion
    }



}
